package com.study.feign;

import com.study.vo.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 通过sentinel 对openFeign实现熔断降级
 */
@FeignClient(
        value = "ecommerce-study",
        fallback = SentinelFeignClientFallback.class
)
public interface SentinelFeignClient {

    @RequestMapping(value = "study",method = RequestMethod.GET)
    CommonResponse<String> getResultByFeign(@RequestParam(value = "code") Integer code);

}
